-
Notifications
You must be signed in to change notification settings - Fork 88
Added Dlpar_mem_hotplug Tescase #903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: yeswanth <[email protected]>
Signed-off-by: yeswanth <[email protected]>
Signed-off-by: yeswanth <[email protected]>
Now fixed the 2nd reboot issue, Added the support of multi reboot handle from commonOpTestInstallUtil.py Error-1This code is getting error on 2nd reboot, This is the error -->025-09-10 12:02:43,481:op-test.common.OpTestSSH:write:DEBUG:[console-expect]# 2025-09-10 12:02:43,549:op-test.common.OpTestHMC:write:DEBUG:r 2025-09-10 12:02:43,563:op-test.common.OpTestHMC:write:DEBUG:eboot 2025-09-10 12:02:43,637:op-test.common.OpTestHMC:write:DEBUG: 2025-09-10 12:02:43,637:op-test.common.OpTestHMC:write:DEBUG: 2025-09-10 12:02:43,866:op-test.common.OpTestHMC:write:DEBUG:Password: ^[[O2025-09-10 12:03:43,617:op-test.common.OpTestHMC:write:DEBUG:login: timed out after 60 seconds. >>>>>>>>>> Getting time out here 2025-09-10 12:03:43,668:op-test.common.OpTestSSH:write:DEBUG:cat /proc/cmdline 2025-09-10 12:03:43,669:op-test.common.OpTestSSH:write:DEBUG:BOOT_IMAGE=(ieee1275//vdevice/v-scsi@3000006c/disk@8100000000000000,msdos2)/vmlinuz-5.14.0-570.30.1.bz211063.el9.ppc64le root=/dev/mapper/rhel_ltczz219--lp7-root ro crashkernel=2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G rd.lvm.lv=rhel_ltczz219-lp7/root rd.lvm.lv=rhel_ltczz219-lp7/swap biosdevname=0 memory_hotplug.memmap_on_memory=0 Error-2 code (common_utility)if reboot and (req_args or req_remove_args): Reboot the host for the kernel command to reflectif reboot_cmd: raw_pty = self.cv_SYSTEM.console.get_console() After the first reboot, framework re-establishes console/SSH. When try to reboot a 2nd time, self.cv_SYSTEM.console.get_console() is giving stale or HMC session, not the OS console. So Adopt these changes in commonUtilitywhile reboot 1)Close stale console 2)Reopen it 3)Then reboot Code changes toif reboot and (req_args or req_remove_args):
After changing the commonUtility hitting another issueOn 1st reboot getting warning log >>>>> Bad file descriptor Error below with above changes -> [console-expect]#grubby --update-kernel=grubby --default-kernel --args="memory_hotplug.memmap_on_memory=0" grubby --update-kernel=grubby --default-kernel --args="memory_hotplug.memmap_on_memory=0" [console-expect]#echo Before calling self.cv_SYSTEM.console.close() ,must stop the SOL reader thread cleanly So added exception in OpTestSOL.py --> Done changes |
Latest Passlog -> 20250910193617344944.debug.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove extra new line character
Please follow Class name convention
Make sure the variables have more meaning full name
# Reboot the host for the kernel command to reflect | ||
if reboot_cmd: | ||
# Always reopen console fresh to avoid stale session after first reboot | ||
self.cv_SYSTEM.console.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below we are anyway opening new console, is it really required?
Also, when reboot is executed, all the consoles will become inactive anyway right?
raw_pty = self.cv_SYSTEM.console.get_console() | ||
raw_pty.sendline("reboot") | ||
raw_pty.expect("login:", timeout=900) | ||
login_patterns = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you facing issues with only "login:" prompt?
Trying to understand why we need login_patterns. If its really needed, can you use re expression to match any prompt ending with login:
self.console.run_command("rm ./smt_script") | ||
|
||
|
||
class Dlpar_mem_hotplug(OpTestDlpar, unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please use standard convention of writing class name?
Something like this. DlparMemHotPlug or something similar.
from common.OpTestSOL import OpSOLMonitorThread | ||
from common import OpTestInstallUtil | ||
from common.OpTestUtil import OpTestUtil | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove additional line
) | ||
# Establish SSH connection | ||
con = self.cv_SYSTEM.cv_HOST.get_ssh_connection() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all additional lines.
log.debug("=================") | ||
# Add memory resource | ||
self.AddRemove("mem", "-q", "a", self.mem_resource) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional lines
log.debug("=================") | ||
# Remove memory resource | ||
self.AddRemove("mem", "-q", "r", self.mem_resource) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove additional line
|
||
def runTest(self): | ||
obj = OpTestInstallUtil.InstallUtil() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove additional line
super(Dlpar_mem_hotplug, self).setUp() | ||
|
||
def runTest(self): | ||
obj = OpTestInstallUtil.InstallUtil() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can obj be replaced with something more meaningful
Added Dlpar_mem_hotplug Tescase